﻿@model IReadOnlyList<Moonglade.Model.Category>

@if (Model.Count > 0)
{
    <div class="list-group list-group-flush">
    @foreach (var item in Model.OrderBy(c => c.DisplayName))
    {
        <a class="list-group-item list-group-item-action" 
           asp-controller="Category" 
           asp-action="List" 
           asp-route-categoryName="@item.Name.ToLower()" 
           title="@item.Note">
            @item.DisplayName
        </a>
    }
    </div>
}
else
{
    <div class="alert alert-info">
        No Categories
    </div>
}